<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.etrans.web.gps.common.Constant" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String headPath = request.getContextPath();
    String headBasePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ headPath + "/";
    String voiceState = "0";
    if(request.getSession().getAttribute(Constant.ALARM_VOICE_STATE) != null){
    	voiceState = request.getSession().getAttribute(Constant.ALARM_VOICE_STATE).toString();
    }
%>
<!DOCTYPE html>
<html lang="en">
 <meta charset="UTF-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <script>var basePath = '${basePath}';</script>
 
 
 <title></title>
 <head>

 <style>
 	.flexigrid .pDiv2{
 		background:#f1f5fe;
 		margin-top: 0px !important;
	    margin-bottom: 0 !important;
	    height: 32px;
	    padding: 3px 0;
 	}
 	#postCheckbox .checkBox{
 	    top: 50%;
    	margin-top: -252px;
    	left: 50%;
    	margin-left: -512px;
    }
    .close{
    	margin-top:2px;
    	margin-right:10px;
    }
    #updateAreaCheckForm{
    	width:380px;
    	padding-bottom:15px;
    	border:1px solid #d0d0d0;
    	z-index:9999;
    	top:50%;
    	margin-top:-131px;
    	left:50%;
    	margin-left:-190px;
    }
    .userOpeart{
    	background:#f0f0f0;
    }
    #background{
    	background:rgba(0,0,0,0.8);
    	top:0;
    	left:0;
    	width:100%;
    	height:100%;
    	z-index:900;
    	filter: alpha(apocity=80%);
    	filter: alpha(opacity = 80) !important;
    	-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(opacity=80)' !important;
    }
 </style>
 </head>

 <body  class="page">
  <div class="header pr clearfix">
        <!-- <div class="clearfix"> -->
            <a class="logo fl"  href="<%=headBasePath%>index/toIndex.html" ><img src="" alt=""></a>
            <div class="info fr clearfix pr">
            	
            	<div class="chagang clearfix fl">
	            	<img class="fl"  id="check" style='margin:3px 4px 0 0 ;width:24px;height:16px' src="<%=headBasePath%>resources/images/check/check0.png">
	            	<a class="fr" href="javascript:;" title="查岗" style='width:28px;height:20px;color:#666'>
	            		<span id="check">查岗</span>
	            	</a>
            	</div>
            	
            	<span class='fl pa'></span>
                <div class="user fl clearfix pr" style='cursor: pointer;'>
                    <div class="name fl" >
                        <span class="icon fl"></span>
                        <p class="username fl" style="">${sessionScope.login_user.login_name}</p>
                    </div>
                    <ul class="logon-info pa dn">
                        <li>
                        	<a href="javascript:alarmTop.bindVoiceEvent();" id="voice" type="<%=voiceState%>" data-toggle="modal">
                        		<%if("1".equals(voiceState)){ %>开启报警声音<%}else{ %>关闭报警声音<%} %>
                        	</a>
                        </li>
                        <li><a href="#loginOut" data-toggle="modal">修改密码</a></li>
                        <li><a href="<%=headBasePath%>loginOut.html">退出系统</a></li>
                    </ul>
                </div>
            </div>
       
    </div>
    <div class='pf' id='background' style='display:none;'></div>
    <div class='pf' id='postCheckbox' style='display:none;'>
    	<div class="checkBox pf" style='width:1024px;'>
		<div class="main pr clearfix">
			<div class="querys " id="tdiv">

				<div class="userResult">
					<div class="userOpeart">
						<ul class="clearfix">
							<li class="userAdd OpeartLi-vehicle fl">
								<a class="db clearfix OpeartA" href="javascript:;" id="updateBtn" name="updateBtn">
									<span class="update-icon db fl OpeartIcon"></span>
									<div class="add-text OpeartText fl" style='color:#5180d2;font-size: 14px;margin-top: 2px;'>查岗应答</div>
								</a>
								
							</li>
							<li class='fr close' >
							<a style='color:#5180d2;'>x</a>
							</li>
						</ul>
					</div>
					
					<div class="queryTable">
						<div id="tbFindAreaChecks"></div>
					</div>
				</div>
				

			</div>
		</div>
	</div>
	<form id="updateAreaCheckForm" method="post" class= 'pf' style='display:none'>
		 <div class='clearfix updateAreaCheckForm' style='background:#f0f0f0'>
		 	查岗应答
		 </div>
		 <div class='pa closeX'>X</div>
         <div class='clearfix mt15'>
	         <input type="hidden" name="_id" id="_id" />
	         <input type="hidden" name="check_time1" id="check_time" />
	         <input type="hidden" name="check_area_id" id="check_area_id" />
	         <input type="hidden" name="answer" id="answer" />
	         <input type="hidden" name="check_id" id="check_id" />
	         <input type="hidden" name="check_type" id="check_type" />
         	<label class="control-label fl" >查岗人:</label><input class='fl' name="checker" id="checker" readonly="readonly"/>
         </div>   
		<div class='clearfix mt15'>
         	<label class="control-label fl" >查岗区域名称:</label><input class='fl' name="check_area_name" id="check_area_name" readonly="readonly"/>
         </div>
         <div class='clearfix mt15'>
         	<label class="control-label fl" >查岗内容:</label><input class='fl' name="check_content" id="check_content" readonly="readonly"/>
         </div>
         <div class='clearfix mt15'>
         	<label class="control-label fl" >回复内容:</label><textarea style='padding-left:8px' class='fl' name="reply_content" id="reply_content"/></textarea>
         </div>
         <div class='clearfix mt15' style='text-align:center'>
         	<button id="saveAreaChecks">提交</button>

         </div>
        
    </form>
    </div>
    <script src="${basePath}resources/js/system/check/findAreaCheck.js"></script>
    <script src="${basePath}resources/js/common/top.js"></script>
    
    <script type="text/javascript">
    	 // 区域查岗应答提醒
		 function taskCheck(){
			var url = appCtx + "system/areaCheck/taskAreaCheck.html";
			$.post(url, function(data) {			
				if(data.flag!=0){
					var path = '<%=headBasePath%>resources/images/check/check1.png';
					$("#check").attr('src',path); 
				}
			}, "json");
		 }
		 setInterval('taskCheck()',5000); //指定5秒刷新一次
 </script>
 </body>